from application import db
from common.models.user import User
from common.models.employ_list import EmployList

class EmployOrder(db.Model):
    __tablename__ = 'employ_order'

    id = db.Column(db.Integer, primary_key=True)
    eid = db.Column(db.Integer,db.ForeignKey('employ_list.id'))
    uid = db.Column(db.Integer,db.ForeignKey('user.id'))
    mark = db.Column(db.Integer)
    updated_time = db.Column(db.DateTime)
    created_time = db.Column(db.DateTime)
    status = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    name = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    phone = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    creater = db.relationship('User', foreign_keys=uid)
    employpost = db.relationship('EmployList',foreign_keys=eid)




